package com.chen.blue.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * Created By CLT On 2023/10/25.
 */
@SuppressWarnings("all")
@Getter
@Setter
@ApiModel(value = "数据返回基类", description = "数据返回基类")
public class ResultBase<T> implements Serializable {

    private static final long serialVersionUid = 1L;

    @ApiModelProperty(value = "当前页数", example = "1", position = 0)
    private Integer pageNo;

    @ApiModelProperty(value = "每页条数", example = "10", position = 1)
    private Integer pageSize;

    @ApiModelProperty(value = "总条数", example = "100", position = 2)
    private Long total;

    @ApiModelProperty(value = "是否有下一页", example = "true", position = 3)
    private boolean hasNext;

    @ApiModelProperty(value = "总页数", example = "10", position = 4)
    private int pages;

    @ApiModelProperty(value = "返回结果", position = 5)
    protected T result;

}
